//
//  UIImage+Extend.m
//  01-网易彩票
//
//  Created by SZSYKT_iOSBasic_2 on 16/2/19.
//  Copyright © 2016年 heima. All rights reserved.
//

#import "UIImage+Extend.h"

@implementation UIImage (Extend)
/**
 *  返回拉伸好的图片
 *
 *  @param imageName 要拉伸图片名
 */
+ (UIImage *)resizableImageWithName:(NSString *)imageName {
    UIImage *image = [UIImage imageNamed:imageName];
    CGFloat top = image.size.height * 0.5;
    CGFloat left = image.size.width * 0.5;
    return  [image  resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, top, left)];
}
@end
